FROM python:3.9.7
WORKDIR /opt/opsadmin-api
ADD ./sources.list /etc/apt/sources.list
ADD ./requirements.txt .

RUN apt update \
    && pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

ADD ./ .

ENTRYPOINT ["python", "manage.py", "runserver", "0.0.0.0:8000"]
